package br.com.controlefinanceiro.integracao;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
@ApplicationScoped
@Named
public class EMF {

	private EntityManagerFactory emf;

	public EntityManagerFactory getEmf() {
		if (emf == null) {
			emf =  Persistence.createEntityManagerFactory("transactions-optional");
			
		}
		return emf;
	}
	
}
